<template>
  <div v-if="Object.keys(param).length !== 0" class="param">
    <table v-for="(item, index) in param.sizes" :key="index" class="size">
      <tr v-for="(tr, index) in item" :key="index">
        <td v-for="(td, index) in tr" :key="index">{{ td }}</td>
      </tr>
    </table>

    <table>
      <tr v-for="(list, index) in param.infos" :key="index" class="infos">
        <td>{{ list.key }}</td>
        <td>{{ list.value }}</td>
      </tr>
    </table>

  </div>
</template>

<script>
export default {
  name: 'paramInfo',
  data() {
    return {}
  },
  props: {
    param: {
      type: Object,
      default() {
        return {}
      },
    },
  },
}
</script>
<style scoped>
.param {
  padding: 10px 15px;
  font-size: 14px;
  border-bottom: 5px solid #f2f5f8;
}
.param table {
  width: 100%;
  border-collapse: collapse;
}
.param table tr {
  height: 42px;
}
.param table tr td {
  border-bottom: 1px solid rgba(100, 100, 100, 0.1);
}
.size td{
  width: 20px;
}
.infos>td {
  width: 25px;
}
.infos td:last-child {
  color: pink;
  font-weight: 500;
}
</style>
